package com.xbongbong.pro.statistic.pojo.dto;

import com.alibaba.fastjson.JSONObject;
import com.xbongbong.paas.domain.entity.ext.PaasFormDataEntityExt;
import com.xbongbong.paas.elasticsearch.pojo.dto.InsertDTO;
import com.xbongbong.paas.enums.BiRelTableEnum;
import com.xbongbong.paas.field.FieldAttrEntity;
import com.xbongbong.pro.statistic.pojo.SlaveSourcePojo;
import com.xbongbong.saas.domain.entity.UserTeamEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @author 梁鲁江
 * @version v1.0
 * @date 2020/5/16 20:18
 * @since v1.0
 */
@ToString
@Getter
@Setter
public class StructureBiInsertDTO {
    private  String corpid;
    private  Boolean hasSecondSlave;
    private  String atlinkAttr;
    private  BiRelTableEnum biRelTableEnum;
    private  List<SlaveSourcePojo> slaveSourceListForCorrelation;
    private  Long warehouseEntityId;
    private  List<PaasFormDataEntityExt> driverList;
    private  Integer driverInData;
    private  Map<Object, PaasFormDataEntityExt> bMap;
    private  Map<Object, PaasFormDataEntityExt> cMap;
    private  Map<Object, PaasFormDataEntityExt> dMap;
    private  Map<Object, PaasFormDataEntityExt> eMap;
    private  Map<Object, PaasFormDataEntityExt> fMap;
    private Map<Long, Set<UserTeamEntity>> aUserMap;
    private Map<Long, Set<UserTeamEntity>> bUserMap;
    private Map<Long, Set<UserTeamEntity>> cUserMap;
    private Map<Long, Set<UserTeamEntity>> dUserMap;
    private Map<Long, Set<UserTeamEntity>> eUserMap;
    private Map<Long, Set<UserTeamEntity>> fUserMap;
    private  List<InsertDTO> insertList;
    private  Map<String, FieldAttrEntity> explainMap;
    private  Integer fieldType;
    private  String secondLinkAttr;
    private  Integer secondFieldType;
    private  Integer driverSecondInData;
    private String linkAttrC ;
    private Integer linkAttrCInData;
    private Integer linkAttrCFieldType;
    private String linkAttrD ;
    private Integer linkAttrDInData;
    private Integer linkAttrDFieldType;
    private String linkAttrE ;
    private Integer linkAttrEInData;
    private Integer linkAttrEFieldType;
    private JSONObject formIdAttr;
    /**
     * 存放从表和主表的id映射关系
     */
    private Map<Long,List<Long>>  slaveBIdMap;
    private Map<Long,List<Long>>  slaveCIdMap;
    private Map<Long,List<Long>>  slaveDIdMap;
    private Map<Long,List<Long>>  slaveEIdMap;
    private Map<Long,List<Long>>  slaveFIdMap;
    /**
     * 主表的业务类型
     */
    private Integer driverBusinessType;
    private Long driverFormId;

    public StructureBiInsertDTO() {
    }

    public StructureBiInsertDTO(String corpid, boolean hasSecondSlave, String atlinkAttr, BiRelTableEnum biRelTableEnum, List<SlaveSourcePojo> slaveSourceListForCorrelation, Long warehouseEntityId, List<PaasFormDataEntityExt> driverList,
                                Integer driverInData, Map<Object, PaasFormDataEntityExt> bMap, Map<Object, PaasFormDataEntityExt> cMap, Map<Object, PaasFormDataEntityExt> dMap, Map<Object, PaasFormDataEntityExt> eMap,
                                Map<Object, PaasFormDataEntityExt> fMap, List<InsertDTO> insertList, Map<String, FieldAttrEntity> explainMap,
                                Integer fieldType, String secondLinkAttr, Integer secondFieldType, Integer driverSecondInData, JSONObject formIdAttr,
                                String linkAttrC,Integer linkAttrCInData,Integer linkAttrCFieldType,String linkAttrD,Integer linkAttrDInData,Integer linkAttrDFieldType,String linkAttrE ,Integer linkAttrEInData,Integer linkAttrEFieldType,Integer driverBusinessType,Long driverFormId
    ) {
        this.corpid = corpid;
        this.hasSecondSlave = hasSecondSlave;
        this.atlinkAttr = atlinkAttr;
        this.biRelTableEnum = biRelTableEnum;
        this.slaveSourceListForCorrelation = slaveSourceListForCorrelation;
        this.warehouseEntityId = warehouseEntityId;
        this.driverList = driverList;
        this.driverInData = driverInData;
        this.bMap = bMap;
        this.cMap = cMap;
        this.dMap = dMap;
        this.eMap = eMap;
        this.fMap = fMap;
        this.insertList = insertList;
        this.explainMap = explainMap;
        this.fieldType = fieldType;
        this.secondLinkAttr = secondLinkAttr;
        this.secondFieldType = secondFieldType;
        this.driverSecondInData = driverSecondInData;
        this.formIdAttr = formIdAttr;
        this.linkAttrC = linkAttrC;
        this.linkAttrCInData = linkAttrCInData;
        this.linkAttrCFieldType = linkAttrCFieldType;
        this.linkAttrD = linkAttrD;
        this.linkAttrDInData = linkAttrDInData;
        this.linkAttrDFieldType = linkAttrDFieldType;
        this.linkAttrE = linkAttrE;
        this.linkAttrEInData = linkAttrEInData;
        this.linkAttrEFieldType = linkAttrEFieldType;
        this.driverBusinessType = driverBusinessType;
        this.driverFormId = driverFormId;
    }
}
